/**
*****************************************************************************
 * @file step_motor.h
 * @brief 步进电机设备函数(步进电机、限位开关)
 * @author Moon
 * @version V1.0.0
 * @date 2022/09/04
****************************************************************************
 */
#ifndef _STEP_MOTOR_H
#define _STEP_MOTOR_H

#include <stdint.h>
#include "func_StepMotor.h"
/* Public defines -----------------------------------------------------------*/
extern volatile uint8_t forward_limit_flag;
extern volatile uint8_t reverse_limit_flag;
extern volatile uint8_t limit_flag;

/* Public Struct -----------------------------------------------------------*/
/* Public enum -----------------------------------------------------------*/

/* Public Variable ---------------------------------------------------------*/
//Pointer
extern func_StepMotor_t StepMotor;
//Array
//Const
/* Pubilc function prototypes -----------------------------------------------*/
void step_soft_limit_res(uint8_t *flimit, uint8_t *rlimit);
void forward_soft_limite_callback(void);
void reverse_soft_limite_callback(void);
uint8_t get_motor_location(void);
void step_motor_init(void);
uint8_t step1_limit_io_read(LIMITE_e limit);


#endif
